﻿@model CuongHanh.Models.NotMapDB.ChangePasswordByForgot
@{
    Layout = "../Shared/_GemLayout.cshtml";
    ViewBag.Title = "Lấy lại mật khẩu";
}

@if(Model.Id != 0
    && string.IsNullOrWhiteSpace(ViewBag.Message))
{
    using (Html.BeginForm("ChangePasswordByForgot",
            "Customer",
            FormMethod.Post))
    {
        if(!string.IsNullOrWhiteSpace(ViewBag.Message))
        {
            <div style="width: 100%; height: 30px;">
                @ViewBag.Message
            </div>
        }

        @Html.AntiForgeryToken()
        @Html.HiddenFor(c => c.Id)
        @Html.HiddenFor(c => c.ResetKey)
        @Html.LabelFor(c => c.OldPassword)
        @Html.TextBoxFor(c => c.OldPassword)
        @Html.LabelFor(c => c.Password)
        @Html.TextBoxFor(c => c.Password)
        @Html.LabelFor(c => c.RePassword)
        @Html.TextBoxFor(c => c.RePassword)
        <input type="submit" value="change pass"/>
    }
}
else
{
    if(!string.IsNullOrWhiteSpace(ViewBag.Message))
    {
        <span>@ViewBag.Message</span>
    }
    else
    {
        <span>Thong tin reset mat khau khong hop le</span>
    }
}
